﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CompanyManager.aspx.cs" Inherits="WebSite.admin.company.CompanyManager" %>

 
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>上海万礼通网络科技后台管理系统</title>
    <link href="../main.css" rel="stylesheet" type="text/css" />
    <script language="javascript">
        parent.maintitle.innerHTML = "商家管理";
        parent.contentmain.innerHTML = "<span class='title01'>所在位置：</span>添加商家。"
    </script>
    <script language='javascript'>
        var path = (window.top.location).toString();
        if (path.indexOf('login.aspx') == -1) {
            if (path.indexOf('index.aspx') == -1) {
                window.top.location = 'index.aspx';
                
            }
        }

        function trim(str){ //删除左右两端的空格
　　     return str.replace(/(^\s*)|(\s*$)/g, "");
        }

        function checkForm() {

            var userName = document.getElementById('<%=this.txtUserName.ClientID %>');
            var password = document.getElementById('<%=this.txtPassword.ClientID %>');
            var confirmPassword = document.getElementById('<%=this.txtConfirmPass.ClientID %>');
            var email = document.getElementById('<%=this.txtEmail.ClientID %>');
            var company = document.getElementById('<%= this.txtName.ClientID %>');
            if (trim(userName.value) == "") {
                alert('管理用户名不能为空!');
                userName.focus();
                return false;
            } else if (trim(password.value) == "") {
                alert('登录密码不能为空!');
                password.focus();
                return false;
            } else if (trim(password.value) != trim(confirmPassword.value)) {
                alert('两次密码不一致!');
                confirmPassword.focus();
                return false;
            }
            else if (trim(email.value) == "") {
                alert('E-Mail不能为空!');
                email.focus();
                return false;
            }
            else if (trim(company.value) == "") {
                alert('公司名称不能为空!');
                company.focus();
                return false;
            }
        
        }
	</script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <center>
<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#F1F4F7">
<tr>
<td height="382" align="center" valign="top">
  <br />
  <table width="90%" border="0" cellpadding="5" cellspacing="0">
      <tr>
      <td width="36%" align="right" class="title01">用户名：</td>
      <td width="64%" align="left">
      <asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>*</td>
    </tr>
      <tr>
      <td align="right" class="title01">登录密码：</td>
      <td align="left">
        <asp:TextBox ID="txtPassword" runat="server" TextMode="Password"></asp:TextBox>
        *</td>
    </tr>
      <tr>
      <td align="right" class="title01">确认密码：</td>
      <td align="left">
        <asp:TextBox ID="txtConfirmPass" runat="server" TextMode="Password"></asp:TextBox>
          *</td>
    </tr>
    <tr>
      <td align="right" class="title01">
          电子邮件：</td>
      <td align="left">
         <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
        *</td>
    </tr>
    <tr>
      <td width="36%" align="right" class="title01">公司名称：</td>
      <td width="64%" align="left">
        <asp:TextBox ID="txtName" runat="server" Width="260px" ></asp:TextBox>*</td>
    </tr>
  
    <tr>
      <td align="right" class="title01">公司地址：</td>
      <td align="left">
         <asp:TextBox ID="txtAddress" Width="260px" runat="server"></asp:TextBox>
      </td>
    </tr>

        <tr>
      <td align="right" class="title01">邮  编：</td>
      <td align="left">   <asp:TextBox ID="txtPostcode" runat="server"></asp:TextBox></td>
    </tr>

        <tr>
      <td align="right" class="title01">联系电话：</td>
      <td align="left">   <asp:TextBox ID="txtTel" runat="server"></asp:TextBox></td>
    </tr>

        <tr>
      <td align="right" class="title01">传  真：</td>
      <td align="left">
         <asp:TextBox ID="txtFax" runat="server"></asp:TextBox>
      </td>
    </tr>

         <tr>
      <td align="right" class="title01">QQ：</td>
      <td align="left">   <asp:TextBox ID="txtQQ" runat="server"></asp:TextBox></td>
    </tr>

       <tr>
      <td align="right" class="title01">联系人：</td>
      <td align="left">
         <asp:TextBox ID="txtLinker" runat="server"></asp:TextBox>
      </td>
    </tr>

      <tr>
      <td align="right" class="title01">公司类别：</td>
      <td align="left">
         <asp:DropDownList ID="ddlCompanyType" runat="server">
           <asp:ListItem Text="经销商" Value="1"></asp:ListItem>
         <asp:ListItem Text="生产商" Value="0"></asp:ListItem>
         </asp:DropDownList>
      </td>
    </tr>

      <tr>
      <td align="right" class="title01">
          <asp:HiddenField ID="hdCompany" runat="server" />
          </td>
      <td align="left">
          <asp:HiddenField ID="hdLoginUser" runat="server" />
          </td>
    </tr>

    <tr>
      <td align="center" colspan="2"><asp:ImageButton ID="ImageButton1" ImageUrl="../images/buttom-02.gif" runat="server" OnClientClick="return checkForm();" OnClick="ImageButton1_Click" />
       <a href="javascript:form1.reset();"><img src="../images/button03.gif" border="0" /></a></td>
    </tr>
  </table></td>
</tr>
</table>
</center>
    </div>
    </form>
</body>
</html>
